package Shangke;

public class User {
    private String username;

    //有参的构造  写了有参构造之后相当于手动声明   就没有无参构造了

    public User(String username) {
        this.username = username;

    }

    public User(){


    }

    public void test(){
        System.out.println("注入的属性值："+username);

    }
}
